package com.szh.zx.duoxiancheng.chapter1;

public class TestProority {
	public static void main(String[] args) {
		System.out.println(Thread.currentThread().getPriority());
		MyProorty myProorty = new MyProorty();
		Thread t1=new Thread(myProorty,"11");
		Thread t2=new Thread(myProorty,"22");
		Thread t3=new Thread(myProorty,"33");
		t1.setPriority(8);
		t1.start();
		t2.setPriority(10);
		t2.start();
		t3.setPriority(1);
		t3.start();


	}
	static  class MyProorty implements Runnable{

		@Override
		public void run() {
			System.out.println(Thread.currentThread().getName()+"：优先级是："+Thread.currentThread().getPriority());
		}
	}
}
